import { configureStore } from '@reduxjs/toolkit';
import login from './reducers/login';
import session from './reducers/session';
import { customerStreams, agentStreams, otherStreams, screenStreams, renderedStreams } from './reducers/stream';
import agent from './reducers/agent';
import chatRecord from './reducers/chatRecord';
import newMessage from './reducers/newMessage';
import screenSync from './reducers/screenSync';
import layout from './reducers/layout';
import { customerMessage, customerMessageList } from './reducers/message';
import setting from './reducers/setting';
import networkStatus from './reducers/networkStatus';
import configure from './reducers/configure';
import logger from './logger';
const reducer = {
	login,
	session,
	customerStreams,
	agentStreams,
	screenStreams,
	otherStreams,
	customerMessage,
	customerMessageList,
	agent,
	chatRecord,
	newMessage,
	screenSync,
	renderedStreams,
	layout,
	setting,
	networkStatus,
	configure
};
const store = configureStore({
	reducer,
	middleware: [logger]
});

export type RootState = ReturnType<any>;

export default store;
